package com.bgdCA.service.impl;

import org.springframework.stereotype.Service;

import java.util.Random;

@Service
public class CaptchaNoPicture {
    public String CreatCaptcha() {

        String str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
        StringBuilder sb = new StringBuilder(4);
        for (int i = 0; i < 4; i++) {
            char ch = str.charAt(new Random().nextInt(str.length()));
            sb.append(ch);
        }
        System.out.println(sb.toString());
        return sb.toString();
    }
}
